package cn.csc.module.order.controller.app.vo;


import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.List;

import static cn.csc.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;


/**
 * 订单信息
 *
 */
@Data
public class OrderRespVO {

	@Schema(description = "订单ID" )
    private BigInteger orderId;

	@Schema(description = "店铺id" )
    private BigInteger shopId;

	@Schema(description = "用户ID" )
    private BigInteger userId;

    @Schema(description = "用户昵称" )
    private String nickName ;

    @Schema(description = "用户手机" )
    private String memberPhone ;

	@Schema(description = "店铺名称" )
	private String shopName;

	@Schema(description = "总值" )
    private BigDecimal total;

	@Schema(description = "单个orderItem的配送类型1.快递物流(默认）,2.送货上门,3.自提" )
    private Integer deliveryType;

	@Schema(description = "订单关闭原因 1-超时未支付 4-买家取消 15-已通过货到付款交易" )
    private Integer closeType;

	@Schema(description = "订单商品总数" )
    private Integer allCount;

	@Schema(description = "付款时间"  )
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime payTime;

	@Schema(description = "发货时间" )
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime deliveryTime;

	@Schema(description = "完成时间" )
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime finallyTime;

	@Schema(description = "取消时间" )
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime cancelTime;
    @Schema(description = "下单时间" )
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime createTime;

	@Schema(description = "是否已支付，1.已支付0.未支付" )
    private Integer isPayed;

	@Schema(description = "用户订单删除状态，0：没有删除， 1：回收站， 2：永久删除" )
    private Integer deleteStatus;

	@Schema(description = "订单项,目前只有单项" )
	private List<OrderItemVO> orderItems;

	@Schema(description = "订单地址" )
	private OrderAddrVO orderAddr;

    @ApiModelProperty(value = "sku名称", required = true)
    private String skuName;

    @ApiModelProperty(value = "产品价格", required = true)
    private BigDecimal price;

    @ApiModelProperty(value = "产品主图片路径", required = true)
    private String pic;
    @ApiModelProperty(value = "会员地址id", required = true)
    private BigInteger memberAddrId;
    @ApiModelProperty(value = "订单状态 0未付款,1已付款,2已发货,3已签收,-1退货申请,-2退货中,-3已退货,-4取消交易 -5撤销申请", required = true)
    private int orderStatus;

    @ApiModelProperty(value = "发货附件", required = true)
    private String deliveryFile;
    @ApiModelProperty(value = "订单支付单号", required = true)
    private String outTradeNo;

    @Schema(description = "实付金额" )
    private BigDecimal actualAmount;

    @Schema(description = "购物卡支付金额" )
    private BigDecimal cardPayAmount;


    @Schema(description = "支付类型，0微信支付、1购物卡支付、2结合支付" )
    private Integer payType;


}
